---------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRichter\Data\Re
> plication data\FW-response.log
  log type:  text
 opened on:  25 Apr 2017, 20:12:26

.         
.  
. 
. * Set control variables *
. global cvar = "ged_time* time time2 time3 mean_gdp dev_gdp civilwar nbr_dem"

. 
. use temp,clear
(StateHydrocarbonRents)

. gen n_hm_oil = ln(1+l.total_oil_income_pc) if R_rog_GDPGSRE_Mpc_ln~=.
(10,309 missing values generated)

. gen n_hm0_oil = n_hm_oil
(10,309 missing values generated)

. recode n_hm0_oil (mis=0) if R_totaloilincomepc_HM==0 & R_naturalgasincomepc_HM==0 & R_rog_0_GDPGS
> RE_Mpc_ln~=.
(n_hm0_oil: 3662 changes made)

. qui  logit ged_fail  ged_time* time time2 time3 mean_gdp dev_gdp civilwar nbr_dem mean_hmoil dev_
> hmoil mean_fail, cluster(cowcode)

. gen s1 = e(sample)==1

. qui logit ged_fail  ged_time* time time2 time3 mean_gdp dev_gdp civilwar nbr_dem R_rog_0_GDPGSRE_
> Mpc_lnm_a R_rog_0_GDPGSRE_Mpc_lnmdev_a mean_fail if e(sample), cluster(cowcode)

. gen s2 = e(sample)==1 

. egen caseid = group(geddes_case)
(6499 missing values generated)

. egen regimetype = group(geddes_regime)
(6499 missing values generated)

. egen region = group(geddes_region)
(6499 missing values generated)

. egen prior= group(geddes_prior)
(8788 missing values generated)

. recode prior (.=0)
(prior: 8788 changes made)

. keep if ged_dem~=. & year>1946 & year<2008  /* autocratic regime sample, 1947-2007 is years with 
> lag oil available */
(6,705 observations deleted)

. keep s1 s2 time* geddes_spell geddes_duration geddes_fail geddes_fail_subsregime ged_dict /*
> */ ged_dem ged_fail mean_dem mean_dict mean_fail year cowcode caseid prior region regimetype $cva
> r /*
> */ n_hm_oil n_hm0_oil R_rog_GDPGSRE_Mpc_ln R_rog_0_GDPGSRE_Mpc_ln hm_oil dev_hmoil mean_hmoil hm_
> fuel mean_hmfuel dev_hmfuel lgdp  price_oil 

. label var time "Calendar time"

. label var time2 "Calendar time-squared"

. label var time3 "Calendar time-cubed"

. label var geddes_spell "Regime spell"

. label var geddes_duration "Regime duration"

. label var geddes_fail "Regime collapse"

. label var geddes_fail_subsregime "Regime collapse, subsequent regime type"

. label var ged_dict "Autocratic transition"

. label var ged_dem "Democratic transition"

. label var mean_dem "Country-mean: democratic transition"

. label var mean_dict "Country-mean: autocratic transition"

. label var mean_fail "Country mean: regime collapse"

. label var year "Year"

. label var cowcode "County code"

. label var caseid "Regime-case identifier"

. label var prior "Prior democracy"

. label var region "Geographic region"

. label var regimetype "Regime type"

. label var n_hm_oil "N rents (log)"

. label var n_hm0_oil "N rents, 0's filled in (log)"

. label var R_rog_GDPGSRE_Mpc_ln "LR rents (log)"

. label var R_rog_0_GDPGSRE_Mpc_ln "LR rents, 0's filled in (log)"

. label var hm_oil "HM rents (log)"

. label var dev_hmoil "Country deviation: HM rents"

. label var mean_hmoil "Country mean: HM rents"

. label var hm_fuel "HM fuel rents (log)"

. label var mean_hmfuel "Country mean: HM fuel rents"

. label var dev_hmfuel "Country deviation: HM fuel rents"

. label var lgdp "GDP per capita (log)"

. label var price_oil "World oil price"

.  
. 
. 
. sutex, minmax labels
%------- Begin LaTeX code -------%

\begin{table}[htbp]\centering \caption{Summary statistics \label{sumstat}}
\begin{tabular}{l c c c c c}\hline\hline
\multicolumn{1}{c}{\textbf{Variable}} & \textbf{Mean}
 & \textbf{Std. Dev.}& \textbf{Min.} &  \textbf{Max.} & \textbf{N}\\ \hline
County code & 505.899 & 217.086 & 40 & 850 & 4381\\
Year & 1978.69 & 15.636 & 1947 & 2007 & 4381\\
Calendar time & 33.686 & 15.63 & 2 & 62 & 4381\\
Calendar time-squared & 1378.976 & 1065.666 & 4 & 3844 & 4381\\
Calendar time-cubed & 62623.121 & 64485.5 & 8 & 238328 & 4381\\
Regime spell & 37.326 & 34.302 & 1 & 269 & 4381\\
Regime duration & 21.536 & 30.455 & 1 & 266 & 4381\\
Regime collapse & 0.049 & 0.216 & 0 & 1 & 4381\\
Regime collapse, subsequent regime type & 0.079 & 0.373 & 0 & 4 & 4381\\
Democratic transition & 0.022 & 0.148 & 0 & 1 & 4381\\
Autocratic transition & 0.025 & 0.155 & 0 & 1 & 4381\\
Civil War (UCDP/PRIO) & 0.147 & 0.354 & 0 & 1 & 4381\\
Time since Last Breakdown (GWF) & 19.072 & 17.333 & 1 & 105 & 4381\\
Time since Last Breakdown Squared (GWF) & 664.087 & 1167.62 & 1 & 11025 & 4381\\
Time since Last Breakdown Cubic (GWF) & 31477.06 & 85912.115 & 1 & 1157625 & 4381\\
Country-mean: democratic transition & 0.023 & 0.036 & 0 & 1 & 4381\\
Country-mean: autocratic transition & 0.025 & 0.034 & 0 & 0.194 & 4381\\
Country Mean GDP pc ln (Maddison) & 7.514 & 0.794 & 6.167 & 9.723 & 4282\\
Country mean: regime collapse & 0.049 & 0.054 & 0 & 1 & 4381\\
Deviation from Country Mean GDP pc ln (Maddison) & -0.009 & 0.36 & -1.645 & 1.529 & 4192\\
Neighboring Democratic Transition & 0.331 & 0.597 & 0 & 2 & 4275\\
HM rents (log) & 1.98 & 2.792 & 0 & 11.108 & 4230\\
Country mean: HM rents & 1.982 & 2.535 & 0 & 9.676 & 4296\\
Country deviation: HM rents & 0.006 & 1.144 & -6.806 & 5.462 & 4230\\
HM fuel rents (log) & 2.616 & 2.833 & 0 & 11.11 & 4224\\
Country mean: HM fuel rents & 2.623 & 2.568 & 0 & 9.738 & 4296\\
Country deviation: HM fuel rents & 0.012 & 1.191 & -6.831 & 5.462 & 4224\\
GDP per capita (log) & 7.791 & 1.016 & 5.406 & 11.253 & 4188\\
Regime Breakdown & 0.048 & 0.215 & 0 & 1 & 4381\\
World oil price & 13.686 & 13.04 & 1.93 & 66.52 & 4381\\
LR rents (log) & 5.176 & 2.325 & 0 & 9.675 & 678\\
LR rents, 0's filled in (log) & 1.253 & 2.495 & 0 & 9.675 & 2800\\
N rents (log) & 5.689 & 2.67 & 0 & 11.108 & 678\\
N rents, 0's filled in (log) & 1.4 & 2.785 & 0 & 11.108 & 2755\\
s1 & 0.945 & 0.229 & 0 & 1 & 4381\\
s2 & 0.623 & 0.485 & 0 & 1 & 4381\\
Regime-case identifier & 152.919 & 76.346 & 1 & 280 & 4381\\
Regime type & 6.056 & 2.03 & 1 & 10 & 4381\\
Geographic region & 5.366 & 2.474 & 1 & 9 & 4381\\
Prior democracy & 3.039 & 4.326 & 0 & 14 & 4381\\
\hline
\end{tabular}
\end{table}
%------- End LaTeX code -------%

. saveold temp1, replace version(12)  /* use this data set for imputations */
(saving in Stata 12 format, which can be read by Stata 11 or 12)
file temp1.dta saved

. 
. use temp, clear
(StateHydrocarbonRents)

. gen s0 = R_rog_GDPGSRE_Mpc_ln~=. 

. qui logit ged_fail  ged_time* time time2 time3 mean_gdp dev_gdp civilwar nbr_dem mean_hmoil dev_h
> moil mean_fail, cluster(cowcode)

. gen s1 = e(sample)

. tab s1 if geddes_duration~=.  &  mad_lgdppc~=. & year<2008 /* 3.6 % missing oil data */

         s1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         98        2.31        2.31
          1 |      4,137       97.69      100.00
------------+-----------------------------------
      Total |      4,235      100.00

. tab geddes_duration if geddes_duration~=.  &  mad_lgdppc~=.  & year<2008 & s1==0  /* 20% of these
>  are first years in the data, lagged caused missing */

    Time at |
    risk of |
 failure at |
     time t |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         20       20.41       20.41
          2 |          5        5.10       25.51
          3 |          6        6.12       31.63
          4 |          2        2.04       33.67
          5 |          3        3.06       36.73
          6 |          6        6.12       42.86
          7 |          2        2.04       44.90
          8 |          1        1.02       45.92
          9 |          1        1.02       46.94
         10 |          1        1.02       47.96
         11 |          1        1.02       48.98
         12 |          2        2.04       51.02
         13 |          3        3.06       54.08
         14 |          2        2.04       56.12
         15 |          3        3.06       59.18
         18 |          1        1.02       60.20
         20 |          2        2.04       62.24
         21 |          2        2.04       64.29
         22 |          1        1.02       65.31
         23 |          3        3.06       68.37
         24 |          2        2.04       70.41
         25 |          4        4.08       74.49
         26 |          3        3.06       77.55
         27 |          2        2.04       79.59
         28 |          5        5.10       84.69
         29 |          6        6.12       90.82
         30 |          3        3.06       93.88
         31 |          1        1.02       94.90
         32 |          1        1.02       95.92
         40 |          1        1.02       96.94
         62 |          1        1.02       97.96
        104 |          1        1.02       98.98
        209 |          1        1.02      100.00
------------+-----------------------------------
      Total |         98      100.00

. keep if s1==1
(6,948 observations deleted)

. qui logit ged_fail  ged_time* time time2 time3 mean_gdp dev_gdp civilwar nbr_dem R_rog_0_GDPGSRE_
> Mpc_lnm_a R_rog_0_GDPGSRE_Mpc_lnmdev_a mean_fail if e(sample), cluster(cowcode)

. gen s2 = e(sample)==1 /* Lucas & Richter sample */

. gen sample = s0

. replace sample = 2 if s0==0 & s2==1
(2,053 real changes made)

. replace sample = 3 if s2==0
(1,407 real changes made)

.  
. *** Figure 1 ***
. egen yrms1=mean(s0), by(year)

. replace yrms1 = 1-yrms1
(4,138 real changes made)

. egen yrms2 = mean(s2), by(year)

. replace yrms2 = 1-yrms2
(4,088 real changes made)

. egen tagyr = tag(year) if yrms2~=. & yrms1~=.

. gen yrms=1

. 
. table year , c(mean yrms2)

-----------------------
     year | mean(yrms2)
----------+------------
     1947 |    .3636364
     1948 |    .4166667
     1949 |    .5555556
     1950 |    .5789474
     1951 |    .4651163
     1952 |    .4651163
     1953 |    .4888889
     1954 |    .4782609
     1955 |    .4583333
     1956 |    .4893617
     1957 |    .5217391
     1958 |          .5
     1959 |    .4897959
     1960 |         .48
     1961 |    .3846154
     1962 |    .3939394
     1963 |    .4142857
     1964 |    .3888889
     1965 |    .4189189
     1966 |    .4133334
     1967 |    .3974359
     1968 |    .3827161
     1969 |    .3571429
     1970 |    .3294117
     1971 |    .2941176
     1972 |    .2405064
     1973 |    .2117647
     1974 |          .2
     1975 |    .2555556
     1976 |    .2795699
     1977 |    .2947369
     1978 |    .2842105
     1979 |    .2842105
     1980 |    .2954546
     1981 |    .3076923
     1982 |    .3406593
     1983 |    .3186813
     1984 |    .3111111
     1985 |    .3258427
     1986 |    .3103448
     1987 |    .3023256
     1988 |    .2941176
     1989 |    .2738096
     1990 |       .2375
     1991 |    .1917808
     1992 |    .1940299
     1993 |    .2739726
     1994 |    .3188406
     1995 |      .34375
     1996 |     .328125
     1997 |    .3731343
     1998 |    .3714285
     1999 |    .3768116
     2000 |     .358209
     2001 |    .3225806
     2002 |     .295082
     2003 |     .295082
     2004 |    .2931035
     2005 |    .3157895
     2006 |    .3859649
     2007 |    .5862069
-----------------------

. 
. twoway(bar yrms year  if tagyr==1, sort col(gs15))   (bar yrms1 year  if tagyr==1, sort col(red))
>  (bar yrms2 year if tagyr==1, sort col(blue) /*
> */ scheme(lean2) ylab(0(.2)1,glcolor(gs15)) xscale(range(1950 2005)) xlab(1950(10)2000) xtitle(Ye
> ar) /*
> */ ytitle(Share of WFG sample covered) legend(lab(1 "GSRE") lab(2 "GSRE + HM zeros") lab(3 "LR mi
> ssing") pos(6) ring(1) col(3))) 

. graph export "C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRichter\Fig1
> .pdf", as(pdf) replace
(file C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRichter\Fig1.pdf writt
> en in PDF format)

. drop yrms yrms2 yrms1 tagyr

. tab s2 if year<1974 /* 40% missing prior to 3rd wave */

         s2 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        608       39.84       39.84
          1 |        918       60.16      100.00
------------+-----------------------------------
      Total |      1,526      100.00

. sum ged_dict ged_dem if year<1974

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    ged_dict |      1,526     .034076     .181484          0          1
     ged_dem |      1,526    .0157274    .1244596          0          1

. sum ged_dict ged_dem if year>=1974

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    ged_dict |      2,612    .0195253    .1383885          0          1
     ged_dem |      2,612    .0264165    .1604012          0          1

. 
. *** Table 1 ***
. tab sample

     sample |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        678       16.38       16.38
          2 |      2,053       49.61       66.00
          3 |      1,407       34.00      100.00
------------+-----------------------------------
      Total |      4,138      100.00

. table sample, c(min year max year n year)

----------------------------------------------
   sample |  min(year)   max(year)     N(year)
----------+-----------------------------------
        1 |       1964        2007         678
        2 |       1947        2007       2,053
        3 |       1947        2007       1,407
----------------------------------------------

. table sample, c(mean hm_oil mean ged_dem mean ged_dict)

----------------------------------------------------------
   sample |   mean(hm_oil)   mean(ged_dem)  mean(ged_dict)
----------+-----------------------------------------------
        1 |       5.688596        .0117994        .0132743
        2 |              0        .0224062        .0306868
        3 |       3.147449        .0277185        .0220327
----------------------------------------------------------

. sum hm_oil ged_dem ged_dict if s2==1  

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      hm_oil |      2,731    1.412255    2.794599          0    11.1078
     ged_dem |      2,731     .019773    .1392448          0          1
    ged_dict |      2,731     .026364    .1602445          0          1

. sum hm_oil ged_dem ged_dict if s1==1 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      hm_oil |      4,138    2.002254    2.804599          0    11.1078
     ged_dem |      4,138    .0224746    .1482391          0          1
    ged_dict |      4,138    .0248913    .1558125          0          1

. forval i = 1(1)3 { 
  2.         egen c`i'tag = tag(cowcode) if sample==`i'
  3.         tab c`i'tag
  4.         egen coil`i'tag = tag(cowcode) if sample==`i' & hm_oil>0
  5.         tab coil`i'tag 
  6.         drop  coil`i'tag   c`i'tag 
  7. }

tag(cowcode |
          ) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      4,098       99.03       99.03
          1 |         40        0.97      100.00
------------+-----------------------------------
      Total |      4,138      100.00

tag(cowcode |
          ) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      4,104       99.18       99.18
          1 |         34        0.82      100.00
------------+-----------------------------------
      Total |      4,138      100.00

tag(cowcode |
          ) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      4,068       98.31       98.31
          1 |         70        1.69      100.00
------------+-----------------------------------
      Total |      4,138      100.00

tag(cowcode |
          ) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      4,138      100.00      100.00
------------+-----------------------------------
      Total |      4,138      100.00

tag(cowcode |
          ) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      4,069       98.33       98.33
          1 |         69        1.67      100.00
------------+-----------------------------------
      Total |      4,138      100.00

tag(cowcode |
          ) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      4,072       98.41       98.41
          1 |         66        1.59      100.00
------------+-----------------------------------
      Total |      4,138      100.00

. egen c12tag = tag(cowcode) if s2==1

. tab c12tag if s2==1

tag(cowcode |
          ) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      2,641       96.70       96.70
          1 |         90        3.30      100.00
------------+-----------------------------------
      Total |      2,731      100.00

. egen coil12tag =  tag(cowcode) if s2==1 & hm_oil>0 

. tab coil12tag if s2==1

tag(cowcode |
          ) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      2,697       98.76       98.76
          1 |         34        1.24      100.00
------------+-----------------------------------
      Total |      2,731      100.00

. egen c123tag = tag(cowcode) if s1==1

. tab c123tag if s1==1

tag(cowcode |
          ) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      4,024       97.25       97.25
          1 |        114        2.75      100.00
------------+-----------------------------------
      Total |      4,138      100.00

. egen coil123tag =  tag(cowcode) if s1==1 & hm_oil>0 

. tab coil123tag if s1==1

tag(cowcode |
          ) |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      4,071       98.38       98.38
          1 |         67        1.62      100.00
------------+-----------------------------------
      Total |      4,138      100.00

. drop *tag

. 
. *** Correlates of missing data ***  democratic transition years less likely to be in sample
. logit s2 ged_time* time time2 time3 mean_gdp dev_gdp civilwar nbr_dem mean_hmoil dev_hmoil, clust
> er(cowcode)

Iteration 0:   log pseudolikelihood = -2652.6579  
Iteration 1:   log pseudolikelihood = -2313.1852  
Iteration 2:   log pseudolikelihood =  -2302.415  
Iteration 3:   log pseudolikelihood =  -2302.143  
Iteration 4:   log pseudolikelihood = -2302.1423  
Iteration 5:   log pseudolikelihood = -2302.1423  

Logistic regression                             Number of obs     =      4,138
                                                Wald chi2(12)     =      73.04
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -2302.1423               Pseudo R2         =     0.1321

                              (Std. Err. adjusted for 114 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
          s2 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    ged_time |   .0498882   .0384231     1.30   0.194    -.0254198    .1251962
   ged_time2 |  -.0028181   .0014411    -1.96   0.051    -.0056425    6.30e-06
   ged_time3 |   .0000338   .0000134     2.53   0.011     7.62e-06    .0000601
        time |  -.0008882   .0485928    -0.02   0.985    -.0961284     .094352
       time2 |    .001976   .0016482     1.20   0.231    -.0012545    .0052065
       time3 |  -.0000289    .000017    -1.70   0.089    -.0000621    4.41e-06
    mean_gdp |  -.5187204   .2830279    -1.83   0.067    -1.073445    .0360041
     dev_gdp |   .0412943   .3336156     0.12   0.901    -.6125802    .6951688
    civilwar |  -.6326102   .3457543    -1.83   0.067    -1.310276    .0450559
     nbr_dem |   .0278658   .0687592     0.41   0.685    -.1068997    .1626313
  mean_hmoil |   -.181275   .0801559    -2.26   0.024    -.3383777   -.0241722
   dev_hmoil |  -.2076493   .0995936    -2.08   0.037    -.4028492   -.0124493
       _cons |   4.087729   2.197698     1.86   0.063    -.2196801    8.395139
------------------------------------------------------------------------------

. outtex

%------- Begin LaTeX code -------%

{
\begin{table}[htbp]\centering
 \caption{Estimation results : logit
\label{tabresult logit}}
\begin{tabular}{l c c }\hline\hline 
\multicolumn{1}{c}
{\textbf{Variable}}
 & {\textbf{Coefficient}}  & \textbf{(Std. Err.)} \\ \hline
ged\_time  &  0.050  & (0.038)\\
ged\_time2  &  -0.003  & (0.001)\\
ged\_time3  &  0.000  & (0.000)\\
time  &  -0.001  & (0.049)\\
time2  &  0.002  & (0.002)\\
time3  &  0.000  & (0.000)\\
mean\_gdp  &  -0.519  & (0.283)\\
dev\_gdp  &  0.041  & (0.334)\\
civilwar  &  -0.633  & (0.346)\\
nbr\_dem  &  0.028  & (0.069)\\
mean\_hmoil  &  -0.181  & (0.080)\\
dev\_hmoil  &  -0.208  & (0.100)\\
Intercept  &  4.088  & (2.198)\\
\hline
\end{tabular}
\end{table}
}

%------- End LaTeX code -------%

. 
. * Use the same procedure of filling in 0s using HM data
. tsset cowcode year
       panel variable:  cowcode (unbalanced)
        time variable:  year, 1947 to 2007, but with gaps
                delta:  1 unit

. gen l_hmoil = hm_oil

. gen n_hm_oil = hm_oil 

. replace n_hm_oil=. if  R_rog_GDPGSRE_Mpc_ln==.
(3,460 real changes made, 3,460 to missing)

. sum n_hm_oil R_rog_GDPGSRE_Mpc_ln if s2==1 & R_rog_GDPGSRE_Mpc_ln~=.

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    n_hm_oil |        678    5.688596    2.670322          0    11.1078
R_rog_GDPG~n |        678    5.175524    2.325243          0   9.674683

. sum n_hm_oil R_rog_GDPGSRE_Mpc_ln if s2==1  

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    n_hm_oil |        678    5.688596    2.670322          0    11.1078
R_rog_GDPG~n |        678    5.175524    2.325243          0   9.674683

. pwcorr n_hm_oil R_rog_GDPGSRE_Mpc_ln if s2==1,obs

             | n_hm_oil R_rog_..
-------------+------------------
    n_hm_oil |   1.0000 
             |      678
             |
R_rog_GDPG~n |   0.8589   1.0000 
             |      678      678
             |

. twoway scatter n_hm_oil R_rog_GDPGSRE_Mpc_ln if s2==1, scheme(lean2) ylab(,glcolor(gs15))

. recode n_hm_oil (mis=0) if R_totaloilincomepc_HM==0 & R_naturalgasincomepc_HM==0 & R_rog_0_GDPGSR
> E_Mpc_ln~=.
(n_hm_oil: 2009 changes made)

. egen n_mean_hmoil = mean(n_hm_oil), by(cowcode)
(757 missing values generated)

. gen n_dev_hmoil = n_hm_oil-n_mean_hmoil
(1,451 missing values generated)

. 
. * Compare oil measures 
. sum R_rog_GDPGSRE_Mpc_ln n_mean_hmoil n_dev_hmoil R_rog_0_GDPGSRE_Mpc_lnm_a R_rog_0_GDPGSRE_Mpc_l
> nmdev_a if s0==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
R_rog_GDPG~n |        678    5.175524    2.325243          0   9.674683
n_mean_hmoil |        678    5.118392    2.718904          0   9.634325
 n_dev_hmoil |        678    .5702038    1.201835  -3.536354   5.630266
R_rog_0_~m_a |        678    4.485874    2.412744   .0004277   8.420075
R_rog_0_~v_a |        678    .6896495    1.378207  -3.888693   4.850843

. corr n_mean_hmoil R_rog_0_GDPGSRE_Mpc_lnm_a if s0==1
(obs=678)

             | n_mean~l R_rog_..
-------------+------------------
n_mean_hmoil |   1.0000
R_rog_0_~m_a |   0.9587   1.0000


. corr n_dev_hmoil R_rog_0_GDPGSRE_Mpc_lnmdev_a if s0==1
(obs=678)

             | n_dev_~l R_rog_..
-------------+------------------
 n_dev_hmoil |   1.0000
R_rog_0_~v_a |   0.7484   1.0000


. 
. * Compare deviations *
. pwcorr n_dev_hmoil dev_hmoil R_rog_0_GDPGSRE_Mpc_lnmdev_a if s2==1,obs

             | n_dev_~l dev_h~il R_rog_..
-------------+---------------------------
 n_dev_hmoil |   1.0000 
             |     2687
             |
   dev_hmoil |   0.9278   1.0000 
             |     2687     2731
             |
R_rog_0_~v_a |   0.8687   0.8137   1.0000 
             |     2687     2731     2731
             |

. twoway scatter n_dev_hmoil R_rog_0_GDPGSRE_Mpc_lnmdev_a if s2==1, scheme(lean2) ylab(,glcolor(gs1
> 5))

. 
. * Compare means *
. pwcorr n_mean_hmoil mean_hmoil R_rog_0_GDPGSRE_Mpc_lnm_a if s2==1,obs

             | n_mean~l mea~moil R_rog_..
-------------+---------------------------
n_mean_hmoil |   1.0000 
             |     2731
             |
  mean_hmoil |   0.9892   1.0000 
             |     2731     2731
             |
R_rog_0_~m_a |   0.9862   0.9748   1.0000 
             |     2731     2731     2731
             |

. twoway scatter n_mean_hmoil R_rog_0_GDPGSRE_Mpc_lnm_a if s2==1, scheme(lean2) ylab(,glcolor(gs15)
> )

. 
. 
. 
. ******************************
. *** Autocratic transitions ***
. ******************************
.         gen beta_dev=.
(4,138 missing values generated)

.         gen beta_mean=.
(4,138 missing values generated)

.         gen hi_dev=.
(4,138 missing values generated)

.         gen hi_mean=.
(4,138 missing values generated)

.         gen lo_dev=.
(4,138 missing values generated)

.         gen lo_mean=.
(4,138 missing values generated)

.  
. * WFG oil data, No LR interpolation, WFG sample *
. logit ged_dict $cvar dev_hmoil mean_hmoil mean_dict if s1==1, cluster(cowcode)

Iteration 0:   log pseudolikelihood = -482.11093  
Iteration 1:   log pseudolikelihood = -424.48677  
Iteration 2:   log pseudolikelihood = -409.37878  
Iteration 3:   log pseudolikelihood = -408.96818  
Iteration 4:   log pseudolikelihood = -408.96552  
Iteration 5:   log pseudolikelihood = -408.96552  

Logistic regression                             Number of obs     =      4,138
                                                Wald chi2(13)     =     127.74
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -408.96552               Pseudo R2         =     0.1517

                              (Std. Err. adjusted for 114 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
    ged_dict |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    ged_time |   .0831546   .0371763     2.24   0.025     .0102904    .1560189
   ged_time2 |  -.0026199    .001154    -2.27   0.023    -.0048816   -.0003581
   ged_time3 |   .0000221   8.95e-06     2.47   0.014     4.54e-06    .0000396
        time |   .0354572    .095728     0.37   0.711    -.1521663    .2230807
       time2 |  -.0008736   .0033295    -0.26   0.793    -.0073992    .0056521
       time3 |  -1.02e-06   .0000354    -0.03   0.977    -.0000704    .0000683
    mean_gdp |  -.3175946   .1642155    -1.93   0.053     -.639451    .0042618
     dev_gdp |   .3845796   .5470546     0.70   0.482    -.6876278    1.456787
    civilwar |   .7012603   .2487805     2.82   0.005     .2136596    1.188861
     nbr_dem |   .3124527   .1733872     1.80   0.072      -.02738    .6522853
   dev_hmoil |  -.3472612   .1447519    -2.40   0.016    -.6309696   -.0635528
  mean_hmoil |  -.0228351   .0493967    -0.46   0.644    -.1196509    .0739807
   mean_dict |   19.87764   2.707758     7.34   0.000     14.57054    25.18475
       _cons |  -2.957681    1.40817    -2.10   0.036    -5.717643   -.1977184
------------------------------------------------------------------------------

.         qui nlcom _b[dev_hmoil], post

.         est store dict1

.         matrix beta =e(b) 

.         qui replace beta_dev = beta[1,1] if _n==1

.         matrix se= e(V)

.         qui replace hi_dev = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==1

.         qui replace lo_dev = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==1

.         qui logit ged_dict $cvar dev_hmoil  mean_hmoil mean_dict if s1==1, cluster(cowcode)

.         qui nlcom _b[mean_hmoil], post

.         matrix beta =e(b) 

.         qui replace beta_mean = beta[1,1] if _n==1

.         matrix se=e(V)

.         qui replace hi_mean = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==1

.         qui replace lo_mean = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==1

.         tab ged_dict if s1==1

Authoritari |
         an |
 Transition |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      4,035       97.51       97.51
          1 |        103        2.49      100.00
------------+-----------------------------------
      Total |      4,138      100.00

. 
. * WFG oil data, LR sample *
. logit ged_dict $cvar n_dev_hmoil n_mean_hmoil mean_dict if s2==1, cluster(cowcode)

Iteration 0:   log pseudolikelihood = -331.63167  
Iteration 1:   log pseudolikelihood = -287.22112  
Iteration 2:   log pseudolikelihood = -274.52061  
Iteration 3:   log pseudolikelihood = -273.65441  
Iteration 4:   log pseudolikelihood = -273.64566  
Iteration 5:   log pseudolikelihood = -273.64566  

Logistic regression                             Number of obs     =      2,687
                                                Wald chi2(13)     =     138.83
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -273.64566               Pseudo R2         =     0.1749

                               (Std. Err. adjusted for 90 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
    ged_dict |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    ged_time |   .1020979    .045487     2.24   0.025      .012945    .1912509
   ged_time2 |  -.0033497   .0013734    -2.44   0.015    -.0060415   -.0006578
   ged_time3 |    .000028   .0000106     2.64   0.008     7.17e-06    .0000488
        time |  -.0766237   .1379844    -0.56   0.579    -.3470681    .1938207
       time2 |   .0031554   .0048002     0.66   0.511    -.0062527    .0125636
       time3 |  -.0000431   .0000516    -0.84   0.403    -.0001442     .000058
    mean_gdp |  -.1503444   .2026745    -0.74   0.458    -.5475792    .2468903
     dev_gdp |  -.3168077   .7042717    -0.45   0.653    -1.697155     1.06354
    civilwar |   .9937735   .3135717     3.17   0.002     .3791842    1.608363
     nbr_dem |   .5620687   .1776806     3.16   0.002     .2138211    .9103163
 n_dev_hmoil |  -.3432524   .2691776    -1.28   0.202    -.8708308    .1843259
n_mean_hmoil |  -.1191306   .0816952    -1.46   0.145    -.2792502    .0409891
   mean_dict |   24.57546   3.321437     7.40   0.000     18.06557    31.08536
       _cons |  -3.663913   2.013672    -1.82   0.069    -7.610639    .2828118
------------------------------------------------------------------------------

.         qui nlcom _b[n_dev_hmoil], post

.         est store dict2

.         matrix beta =e(b) 

.         qui replace beta_dev = beta[1,1] if _n==2

.         matrix se= e(V)

.         qui replace hi_dev = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==2

.         qui replace lo_dev = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==2

.         qui logit ged_dict $cvar n_dev_hmoil  n_mean_hmoil mean_dict if s2==1, cluster(cowcode)

.         qui nlcom _b[n_mean_hmoil], post

.         matrix beta =e(b) 

.         qui replace beta_mean = beta[1,1] if _n==2

.         matrix se=e(V)

.         qui replace hi_mean = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==2

.         qui replace lo_mean = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==2

.         
. * LR oil data, LR interpolation, LR sample *
. logit ged_dict $cvar R_rog_0_GDPGSRE_Mpc_lnmdev_a R_rog_0_GDPGSRE_Mpc_lnm_a mean_dict if s2==1, c
> luster(cowcode)

Iteration 0:   log pseudolikelihood = -332.81695  
Iteration 1:   log pseudolikelihood = -288.92112  
Iteration 2:   log pseudolikelihood = -276.38966  
Iteration 3:   log pseudolikelihood = -275.49895  
Iteration 4:   log pseudolikelihood = -275.48903  
Iteration 5:   log pseudolikelihood = -275.48902  

Logistic regression                             Number of obs     =      2,731
                                                Wald chi2(13)     =     144.12
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -275.48902               Pseudo R2         =     0.1723

                                               (Std. Err. adjusted for 90 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |               Robust
                    ged_dict |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
                    ged_time |    .096549   .0445449     2.17   0.030     .0092426    .1838554
                   ged_time2 |  -.0031845   .0013382    -2.38   0.017    -.0058074   -.0005616
                   ged_time3 |   .0000268   .0000103     2.60   0.009     6.56e-06     .000047
                        time |  -.0672647   .1358339    -0.50   0.620    -.3334943    .1989649
                       time2 |   .0027735   .0046529     0.60   0.551     -.006346     .011893
                       time3 |  -.0000388   .0000493    -0.79   0.431    -.0001355    .0000579
                    mean_gdp |  -.2018064    .198738    -1.02   0.310    -.5913257     .187713
                     dev_gdp |  -.3892317   .6877239    -0.57   0.571    -1.737146    .9586824
                    civilwar |   .9835392   .3129515     3.14   0.002     .3701656    1.596913
                     nbr_dem |   .5538033   .1764031     3.14   0.002     .2080597     .899547
R_rog_0_GDPGSRE_Mpc_lnmdev_a |  -.3531719   .2793147    -1.26   0.206    -.9006187    .1942749
   R_rog_0_GDPGSRE_Mpc_lnm_a |  -.1108215   .0908571    -1.22   0.223    -.2888982    .0672552
                   mean_dict |   23.97222   3.212179     7.46   0.000     17.67646    30.26797
                       _cons |  -3.321398   2.029772    -1.64   0.102    -7.299679    .6568829
----------------------------------------------------------------------------------------------

.         qui nlcom _b[R_rog_0_GDPGSRE_Mpc_lnmdev_a], post

.         est store dict3

.         matrix beta =e(b) 

.         qui replace beta_dev = beta[1,1] if _n==3

.         matrix se= e(V)

.         qui replace hi_dev = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==3

.         qui replace lo_dev = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==3

.         qui logit ged_dict $cvar R_rog_0_GDPGSRE_Mpc_lnmdev_a R_rog_0_GDPGSRE_Mpc_lnm_a mean_dict
>  if s2==1, cluster(cowcode)

.         qui nlcom _b[R_rog_0_GDPGSRE_Mpc_lnm_a], post

.         matrix beta =e(b) 

.         qui replace beta_mean = beta[1,1] if _n==3

.         matrix se=e(V)

.         qui replace hi_mean = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==3

.         qui replace lo_mean = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==3

.         
.         /*
>         gen ld=ln(ged_time)
>          krls ged_dict $cvar R_rog_0_GDPGSRE_Mpc_lnmdev_a R_rog_0_GDPGSRE_Mpc_lnm_a mean_dict if 
> s2==1, deriv
>          sort ld
>         twoway scatter d_R_rog_0_GDPGSRE_Mpc_lnmdev_a  ld,mcolor(gs13)||lowess d_R_rog_0_GDPGSRE_
> Mpc_lnmdev_a /*
>         */ ld,color(blue)bw(.15) scheme(lean2) legend(off) ylab(,glcolor(gs15)) xtitle(Regime dur
> ation (log))/*
>         */ ytitle(Marginal effect of oil,height(-1)) yline(-.000994 ,lcolor(black)) yline(0,lcolo
> r(red))
>         ttest d_R_rog_0_GDPGSRE_Mpc_lnmdev_a, by(civilwar)
>         */
.  
.  * Plot estimates *
.         gen n = _n

.         gen rdev=round(beta_dev, 0.001)
(4,135 missing values generated)

.         gen rmean=round(beta_mean, 0.001)
(4,135 missing values generated)

.         twoway (scatter beta_dev n if _n<=3, title(Deviations) xtitle("") ytitle(Coefficient esti
> mate, height(-5)) /*
>         */ xscale(range(0.75 3.25)) xlab(1 "HMrents" 2 "Nrents" 3 "LRrents") yline(0,lcolor(black
> )) mlab(rdev)) /*
>         */ (rspike hi_dev lo_dev n if _n<=3, scheme(lean2) ylab(-.8(.2).2,glcolor(gs15)) legend(l
> ab(1 "estimate") /*
>         */ lab(2 "95 CI") pos(6) ring(1) col(2)) saving(h1,replace))
(note: file h1.gph not found)
(file h1.gph saved)

.         twoway (scatter beta_mean n if _n<=3, title(Means) xtitle("") ytitle(Coefficient estimate
> , height(-5)) /*
>         */ xscale(range(0.75 3.25)) xlab(1 "HMrents" 2 "Nrents" 3 "LRrents") yline(0,lcolor(black
> )) mlab(rmean)) /*
>         */ (rspike hi_mean lo_mean n if _n<=3, scheme(lean2) yscale(range(-.8 .2)) ylab(-.8(.2).2
> ,glcolor(gs15)) legend(lab(1 "estimate") /*
>         */ lab(2 "95 CI") pos(6) ring(1) col(2)) saving(h2,replace))
(note: file h2.gph not found)
(file h2.gph saved)

.                 
.         graph combine h1.gph h2.gph, col(2) xsize(3)   ysize(1.4)  scheme(lean2) b1()

.         graph export "C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRich
> ter\Fig2.pdf", as(pdf) replace
(file C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRichter\Fig2.pdf writt
> en in PDF format)

. 
.         drop beta_* hi_* lo_* n rdev rmean

. 
.         sort year

.         gen negdev= dev_hmoil<0

.         listtex geddes_case year if ged_dict==1  & s2==0 & s1==1  using dict.tex, rs(tabular) rep
> lace
(note: file dict.tex not found)

.         tab negdev if ged_dict==1  & s2==0 & s1==1

     negdev |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         11       35.48       35.48
          1 |         20       64.52      100.00
------------+-----------------------------------
      Total |         31      100.00

.         tab geddes_region if ged_dict==1  & s2==0 & s1==1

 Geographic |
region (11) |      Freq.     Percent        Cum.
------------+-----------------------------------
      cacar |          2        6.45        6.45
      casia |          7       22.58       29.03
   ceeurope |          2        6.45       35.48
      easia |          2        6.45       41.94
      meast |          5       16.13       58.06
    nafrica |          2        6.45       64.52
   samerica |          8       25.81       90.32
   ssafrica |          3        9.68      100.00
------------+-----------------------------------
      Total |         31      100.00

.  
. /*              Autocracy-Autocracy transitions dropped by change in sample: 2/3 (65%) have oil i
> ncome BELOW the country-mean; 
>                 over 1/2 occur prior to 1973 oil shock; the majority are from South America, Cent
> ral Africa, and Middle East
> 
>         Bolivia 46-51   1951   -1.580618  
>           Egypt 22-52   1952   -1.687682  
>         Bolivia 51-52   1952   -1.775107  
>        Colombia 49-53   1953   -.0461817  
>       Argentina 51-55   1955   -1.090029  
>       Argentina 55-58   1958   -1.068891  
>            Iraq 32-58   1958   -.7413011  
>        Pakistan 47-58   1958   -.5281982  
>            Cuba 52-59   1959   -1.297489  
>          Turkey 57-60   1960    .0282072  
>       Congo-Brz 60-63   1963   -2.653683  
>            Iraq 58-63   1963   -.1872783  
>         Bolivia 52-64   1964   -.5039504  
>       Indonesia 49-66   1966   -.8802292  
>       Argentina 58-66   1966   -.3229029  
>       Congo-Brz 63-68   1968   -3.509695  
>           Libya 51-69   1969     1.82058  
>         Bolivia 69-71   1971   -.4858894  
>      Afganistan 29-73   1973           0  
>      Bangladesh 71-75   1975   -.0171457  
>        Pakistan 75-77   1977   -.0816716  
>     Afghanistan 73-78   1978           0  
>            Iraq 68-79   1979    1.543822  
>            Iran 25-79   1979     1.68196  
>      Bangladesh 75-82   1982   -.0171457  
>       Guatemala 70-85   1985    1.804235  
>         Myanmar 62-88   1988    .1698394  
>      Yugoslavia 45-90   1990    1.123126  
>         Belarus 91-94   1994   -.1487746  
>     Congo/Zaire 60-97   1997    .4730105  
>      Kyrgyzstan 91-05   2005    .0376712  
> */
.                         
. ******************************
. *** Democratic transitions ***
. ******************************
.         gen beta_dev=.
(4,138 missing values generated)

.         gen beta_mean=.
(4,138 missing values generated)

.         gen hi_dev=.
(4,138 missing values generated)

.         gen hi_mean=.
(4,138 missing values generated)

.         gen lo_dev=.
(4,138 missing values generated)

.         gen lo_mean=.
(4,138 missing values generated)

.  
. * HMrents, WFG sample *
. logit ged_dem $cvar dev_hmoil mean_hmoil mean_dem if s1==1, cluster(cowcode)

Iteration 0:   log pseudolikelihood = -444.91627  
Iteration 1:   log pseudolikelihood = -379.75855  
Iteration 2:   log pseudolikelihood = -357.62802  
Iteration 3:   log pseudolikelihood = -356.85204  
Iteration 4:   log pseudolikelihood = -356.84776  
Iteration 5:   log pseudolikelihood = -356.84776  

Logistic regression                             Number of obs     =      4,138
                                                Wald chi2(13)     =     103.49
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -356.84776               Pseudo R2         =     0.1979

                              (Std. Err. adjusted for 114 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
     ged_dem |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    ged_time |   .0143096   .0384435     0.37   0.710    -.0610383    .0896576
   ged_time2 |  -.0004235   .0011502    -0.37   0.713    -.0026778    .0018308
   ged_time3 |   5.31e-06   9.16e-06     0.58   0.562    -.0000127    .0000233
        time |  -.1880496   .1123111    -1.67   0.094    -.4081754    .0320761
       time2 |   .0070322   .0035077     2.00   0.045     .0001571    .0139072
       time3 |  -.0000638   .0000322    -1.98   0.048     -.000127   -6.28e-07
    mean_gdp |   .1592239   .1404632     1.13   0.257    -.1160788    .4345266
     dev_gdp |   .6503449   .4899419     1.33   0.184    -.3099235    1.610613
    civilwar |   .3409737   .2467284     1.38   0.167    -.1426051    .8245526
     nbr_dem |   .4470436   .1568557     2.85   0.004      .139612    .7544752
   dev_hmoil |  -.0374823   .1864125    -0.20   0.841    -.4028441    .3278795
  mean_hmoil |  -.1694553   .0635159    -2.67   0.008    -.2939441   -.0449665
    mean_dem |   24.10919   3.552377     6.79   0.000     17.14666    31.07172
       _cons |  -5.672978   1.496712    -3.79   0.000     -8.60648   -2.739476
------------------------------------------------------------------------------
Note: 0 failures and 1 success completely determined.

.         qui nlcom _b[dev_hmoil], post

.         est store dict1

.         matrix beta =e(b) 

.         qui replace beta_dev = beta[1,1] if _n==1

.         matrix se= e(V)

.         qui replace hi_dev = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==1

.         qui replace lo_dev = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==1

.         qui logit ged_dem $cvar dev_hmoil  mean_hmoil mean_dem if s1==1, cluster(cowcode)

.         qui nlcom _b[mean_hmoil], post

.         matrix beta =e(b) 

.         qui replace beta_mean = beta[1,1] if _n==1

.         matrix se=e(V)

.         qui replace hi_mean = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==1

.         qui replace lo_mean = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==1

.         
. * Nrents, LR sample *
. logit ged_dem $cvar n_dev_hmoil n_mean_hmoil mean_dem if s2==1, cluster(cowcode)

Iteration 0:   log pseudolikelihood = -260.54593  
Iteration 1:   log pseudolikelihood = -221.02334  
Iteration 2:   log pseudolikelihood = -207.85473  
Iteration 3:   log pseudolikelihood = -207.16518  
Iteration 4:   log pseudolikelihood = -207.15915  
Iteration 5:   log pseudolikelihood = -207.15915  

Logistic regression                             Number of obs     =      2,687
                                                Wald chi2(13)     =      92.44
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -207.15915               Pseudo R2         =     0.2049

                               (Std. Err. adjusted for 90 clusters in cowcode)
------------------------------------------------------------------------------
             |               Robust
     ged_dem |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    ged_time |   .0156119   .0450719     0.35   0.729    -.0727274    .1039512
   ged_time2 |  -.0002471   .0012541    -0.20   0.844    -.0027052    .0022109
   ged_time3 |   3.09e-06   9.90e-06     0.31   0.755    -.0000163    .0000225
        time |   -.231003   .1608592    -1.44   0.151    -.5462811    .0842752
       time2 |   .0079901   .0050356     1.59   0.113    -.0018794    .0178596
       time3 |  -.0000674   .0000462    -1.46   0.145    -.0001579    .0000232
    mean_gdp |  -.0417867   .1696656    -0.25   0.805    -.3743251    .2907517
     dev_gdp |   .3408962    .911828     0.37   0.709    -1.446254    2.128046
    civilwar |   .5947071   .3834316     1.55   0.121    -.1568049    1.346219
     nbr_dem |   .2916362   .2133927     1.37   0.172    -.1266059    .7098782
 n_dev_hmoil |  -.1769852     .34397    -0.51   0.607     -.851154    .4971835
n_mean_hmoil |  -.2983448   .1125547    -2.65   0.008    -.5189479   -.0777417
    mean_dem |   29.25266   4.154879     7.04   0.000     21.10924    37.39607
       _cons |  -4.215131   2.055342    -2.05   0.040    -8.243528   -.1867348
------------------------------------------------------------------------------
Note: 0 failures and 1 success completely determined.

.         qui nlcom _b[n_dev_hmoil], post

.         est store dict2

.         matrix beta =e(b) 

.         qui replace beta_dev = beta[1,1] if _n==2

.         matrix se= e(V)

.         qui replace hi_dev = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==2

.         qui replace lo_dev = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==2

.         qui logit ged_dem $cvar n_dev_hmoil  n_mean_hmoil mean_dem if s2==1, cluster(cowcode)

.         qui nlcom _b[n_mean_hmoil], post

.         matrix beta =e(b) 

.         qui replace beta_mean = beta[1,1] if _n==2

.         matrix se=e(V)

.         qui replace hi_mean = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==2

.         qui replace lo_mean = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==2

.         
. * LRrents + 0s filled in, LR sample *
. logit ged_dem $cvar R_rog_0_GDPGSRE_Mpc_lnmdev_a R_rog_0_GDPGSRE_Mpc_lnm_a mean_dem if s2==1, clu
> ster(cowcode)

Iteration 0:   log pseudolikelihood = -265.32829  
Iteration 1:   log pseudolikelihood = -225.80429  
Iteration 2:   log pseudolikelihood = -213.00158  
Iteration 3:   log pseudolikelihood = -212.52018  
Iteration 4:   log pseudolikelihood = -212.51715  
Iteration 5:   log pseudolikelihood = -212.51715  

Logistic regression                             Number of obs     =      2,731
                                                Wald chi2(13)     =      84.22
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -212.51715               Pseudo R2         =     0.1990

                                               (Std. Err. adjusted for 90 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |               Robust
                     ged_dem |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
                    ged_time |   .0124186   .0464891     0.27   0.789    -.0786984    .1035356
                   ged_time2 |  -.0003149   .0012657    -0.25   0.803    -.0027956    .0021657
                   ged_time3 |   4.28e-06   9.88e-06     0.43   0.665    -.0000151    .0000236
                        time |  -.1975759   .1865776    -1.06   0.290    -.5632613    .1681096
                       time2 |   .0072882     .00556     1.31   0.190    -.0036092    .0181856
                       time3 |  -.0000633   .0000495    -1.28   0.201    -.0001602    .0000337
                    mean_gdp |  -.1005611   .1838951    -0.55   0.584     -.460989    .2598667
                     dev_gdp |   .5149819   .8397165     0.61   0.540    -1.130832    2.160796
                    civilwar |   .4951523   .4103655     1.21   0.228    -.3091493    1.299454
                     nbr_dem |   .2340674   .2118939     1.10   0.269     -.181237    .6493717
R_rog_0_GDPGSRE_Mpc_lnmdev_a |  -.5001275   .2423293    -2.06   0.039    -.9750842   -.0251708
   R_rog_0_GDPGSRE_Mpc_lnm_a |   -.285325   .1305406    -2.19   0.029    -.5411799     -.02947
                    mean_dem |   26.40064   4.276484     6.17   0.000     18.01889    34.78239
                       _cons |  -4.018151   2.315784    -1.74   0.083    -8.557004     .520702
----------------------------------------------------------------------------------------------
Note: 0 failures and 1 success completely determined.

.         qui nlcom _b[R_rog_0_GDPGSRE_Mpc_lnmdev_a], post

.         est store dict4

.         matrix beta =e(b) 

.         qui replace beta_dev = beta[1,1] if _n==3

.         matrix se= e(V)

.         qui replace hi_dev = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==3

.         qui replace lo_dev = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==3

.         qui logit ged_dem $cvar R_rog_0_GDPGSRE_Mpc_lnmdev_a R_rog_0_GDPGSRE_Mpc_lnm_a mean_dem i
> f s2==1, cluster(cowcode)

.         qui nlcom _b[R_rog_0_GDPGSRE_Mpc_lnm_a], post

.         matrix beta =e(b) 

.         qui replace beta_mean = beta[1,1] if _n==3

.         matrix se=e(V)

.         qui replace hi_mean = beta[1,1] + (1.96*sqrt(se[1,1])) if _n==3

.         qui replace lo_mean = beta[1,1] - (1.96*sqrt(se[1,1])) if _n==3

.         
.         /*
>         qui: krls ged_dem $cvar R_rog_0_GDPGSRE_Mpc_lnmdev_a R_rog_0_GDPGSRE_Mpc_lnm_a mean_dem i
> f s2==1, deriv
>         *twoway scatter d_R_rog_0_GDPGSRE_Mpc_lnmdev_a lgdp,mcolor(gs13)||lowess d_R_rog_0_GDPGSR
> E_Mpc_lnmdev_a /*
>         */ lgdp,color(blue)bw(.15) scheme(lean2) legend(off) ylab(,glcolor(gs15)) xtitle(GDP per 
> capita (log))/*
>         */ ytitle(Marginal effect of oil,height(-1)) yline(-.005058,lcolor(red))
>         ttest d_R_rog_0_GDPGSRE_Mpc_lnmdev_a, by(civilwar)
>         */
.         
.  * Plot estimates *
.         gen n = _n

.         gen rdev=round(beta_dev, 0.001)
(4,135 missing values generated)

.         gen rmean=round(beta_mean, 0.001)
(4,135 missing values generated)

.         twoway (scatter beta_dev n if _n<=3, title(Deviations) xtitle("") ytitle(Coefficient esti
> mate, height(-5)) /*
>         */ xscale(range(0.75 3.25)) xlab(1 "HMrents" 2 "Nrents" 3 "LRrents") yline(0,lcolor(black
> )) mlab(rdev)) /*
>         */ (rspike hi_dev lo_dev n if _n<=3, scheme(lean2) ylab(-1(.2).6,glcolor(gs15)) legend(la
> b(1 "estimate") /*
>         */ lab(2 "95 CI") pos(6) ring(1) col(2)) saving(h1,replace))
(file h1.gph saved)

.         twoway (scatter beta_mean n if _n<=3, yscale(range(-1 .6)) ylab(-1(.2).6,glcolor(gs15)) t
> itle(Means) xtitle("") ytitle(Coefficient estimate, height(1)) /*
>         */ xscale(range(0.75 3.25)) xlab(1 "HMrents" 2 "Nrents" 3 "LRrents") yline(0,lcolor(black
> )) mlab(rmean)) /*
>         */ (rspike hi_mean lo_mean n if _n<=3, scheme(lean2)  legend(lab(1 "estimate") /*
>         */ lab(2 "95 CI") pos(6) ring(1) col(2))  saving(h2,replace))
(file h2.gph saved)

.                 
.         graph combine h1.gph h2.gph, col(2) xsize(3) ysize(1.4) scheme(lean2)  

.         graph export "C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRich
> ter\Fig3.pdf", as(pdf) replace
(file C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRichter\Fig3.pdf writt
> en in PDF format)

. 
.         drop beta_* hi_* lo_* n rdev rmean

. 
.         sort year

.         listtex geddes_case year if ged_dem==1  & s2==0 & s1==1  using dem.tex, rs(tabular) repla
> ce
(note: file dem.tex not found)

.         tab negdev if ged_dem==1  & s2==0 & s1==1

     negdev |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         23       58.97       58.97
          1 |         16       41.03      100.00
------------+-----------------------------------
      Total |         39      100.00

.         tab geddes_region if ged_dem==1  & s2==0 & s1==1

 Geographic |
region (11) |      Freq.     Percent        Cum.
------------+-----------------------------------
      cacar |          2        5.13        5.13
      casia |          3        7.69       12.82
   ceeurope |          8       20.51       33.33
      easia |          5       12.82       46.15
      meast |          3        7.69       53.85
   samerica |         12       30.77       84.62
   ssafrica |          5       12.82       97.44
        weu |          1        2.56      100.00
------------+-----------------------------------
      Total |         39      100.00

. 
. 
. /*              39 democratic transitions dropped by change in sample: 59% have oil income ABOVE 
> the country-mean; 72% during the Big
>                 Oil Change era; 29 of 39 occur during or after 1973 oil shock; the majority are f
> rom South America and Central/Eastern Europe.
> 
>            Ecuador 44-47   1947   -1.198367  
>             Turkey 23-50   1950   -.8083522  
>               Peru 48-56   1956   -.3975594  
>           Colombia 53-58   1958     .007458  
>          Venezuela 48-58   1958    .1891131  
>            Myanmar 58-60   1960   -.4254036  
>             Turkey 60-61   1961   -.0518355  
>               Peru 62-63   1963   -.4952517  
>            Ecuador 63-66   1966   -1.546829  
>           Pakistan 58-71   1971   -.5899462  
>          Argentina 66-73   1973    .0836225  
>           Thailand 57-73   1973   -.3466797  
>              Spain 39-76   1976    2.537554  
>            Bolivia 80-82   1982    1.875405  
>          Argentina 76-83   1983    1.775219  
>             Turkey 80-83   1983     2.48367  
>             Brazil 64-85   1985     1.39107  
>        Philippines 72-86   1986    .8475993  
>           Pakistan 77-88   1988     .735624  
>              Chile 73-89   1989   -.8117461  
>            Romania 45-89   1989    .0241489  
>             Poland 44-89   1989   -.2682177  
>     Czechoslovakia 48-89   1989    .1466881  
>         Bangladesh 82-90   1990     .069032  
>              Benin 72-90   1990    1.656728  
>           Bulgaria 44-90   1990   -.1050719  
>            Hungary 47-90   1990    .6733813  
>            Albania 44-91   1991    .8196201  
>       Soviet Union 17-91   1991    .9453707  
>          Guatemala 85-95   1995     1.11784  
>            Nigeria 93-99   1999   -.3951344  
>             Mexico 15-00   2000    .8041401  
>              Ghana 81-00   2000    .7672728  
>               Peru 92-00   2000    -.204392  
>             Taiwan 49-00   2000   -.3572869  
>            Senegal 60-00   2000    .0095151  
>            Georgia 92-03   2003   -.0868238  
>         Mauritania 05-07   2007    5.392722  
>           Thailand 06-07   2007    3.255541  
>   
> */
. 
.  
. *************************************************************************************************
> **************************
. *************************************************************************************************
> ************************
. /*
> forval i=1(1)8{
>         use oilimp`i', clear
>         local var = "R_rog_GDPGSRE_Mpc_ln R_rog_0_GDPGSRE_Mpc_ln n_hm_oil n_hm0_oil"
>         foreach v of local var {
>                 egen m_`v' = mean(`v'), by(cow)
>                 gen d_`v' = `v'-m_`v'
>         }
>         sort cow year
>         save, replace
> }
> 
>                 use oil_ave_imp, clear
>                 local var = "R_rog_GDPGSRE_Mpc_ln R_rog_0_GDPGSRE_Mpc_ln n_hm_oil n_hm0_oil"
>                 foreach v of local var {
>                         egen m_`v' = mean(`v'), by(cow)
>                         gen d_`v' = `v'-m_`v'
>                 }       
> */
.  use oil_ave_imp, clear
(Written by R.              )

.  pwcorr R_rog_GDPGSRE_Mpc_ln R_rog_0_GDPGSRE_Mpc_ln n_hm_oil n_hm0_oil hm_oil

             | R_rog_G~ R~0_GD~n n_hm_oil n_hm0_~l   hm_oil
-------------+---------------------------------------------
R_rog_GDPG~n |   1.0000 
R_rog_0_GD~n |   0.7141   1.0000 
    n_hm_oil |   0.9306   0.6262   1.0000 
   n_hm0_oil |   0.6670   0.9631   0.6656   1.0000 
      hm_oil |   0.6702   0.9416   0.6689   0.9793   1.0000 

.  corrtex R_rog_0_GDPGSRE_Mpc_ln   n_hm0_oil hm_oil, file(corr) replace
(note: file corr.tex not found)


\begin{table}[htbp]\centering \caption{Cross-correlation table\label{corrtable}}
\begin{tabular}{l  c  c  c }\hline\hline
\multicolumn{1}{c}{Variables} &R\_rog\_0\_GDPGSRE\_Mpc\_ln&n\_hm0\_oil&hm\_oil\\ \hline
R\_rog\_0\_GDPGSRE\_Mpc\_ln&1.000\\
n\_hm0\_oil&0.963&1.000\\
hm\_oil&0.942&0.979&1.000\\
\hline \hline 
 \end{tabular}
\end{table}

 Output writted successfully in file : corr.tex

. 
. * Democratic transition, LR data *
. clear

. miest oilimp logit ged_dem d_R_rog_0_GDPGSRE_Mpc_ln m_R_rog_0_GDPGSRE_Mpc_ln  $cvar  mean_dem , c
> luster(cowcode)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)

Multiple Imputation Estimates

Model: logit
Dependent Variable: ged_dem

Number of Observations: 4381
---------------------------------------------------------------
         |      Coef.   Std. Err.       t          Df     P>|t|
---------------------------------------------------------------
d_R_rog_0_GDPGSRE_Mpc_ln | -.38034 .2298636   -1.655       81    0.102
m_R_rog_0_GDPGSRE_Mpc_ln |  -.2216 .0834696   -2.655    12770    0.008
ged_time |   -.0049     .0357895     -0.137    1749792    0.891
ged_time2 |  .00024     .0010413      0.229     375598    0.819
ged_time3 | -1.1e-07    8.27e-06     -0.013      88609    0.989
    time |  -.21212     .1081957     -1.961     810804    0.050
   time2 |   .00814     .0034928      2.331    1084511    0.020
   time3 |  -7.4e-05    .0000328     -2.260    1369015    0.024
mean_gdp |   .16775     .1426377      1.176     113719    0.240
 dev_gdp |   .82649     .4595291      1.799        612    0.073
civilwar |   .19505     .2657685      0.734   12747247    0.463
 nbr_dem |   .47867     .1577729      3.034       7424    0.002
mean_dem |   24.034      3.38706      7.096     136902    0.000
   _cons |  -5.7277     1.455471     -3.935      34031    0.000
---------------------------------------------------------------


. matrix results = J(2,3,.) 

. mat rownames results = devLR meanLR  

. mat colnames results = beta lo hi

. local b1 =_mib[1,1]

. local vce1 = _miVCE[1,1]

. mat results[1,1]= `b1'

. mat results[1,2]=  `b1'-(1.96*sqrt(`vce1'))

. mat results[1,3]=  `b1'+(1.96*sqrt(`vce1'))

. local b2 =_mib[2,1]

. local vce2 = _miVCE[2,2]

. mat results[2,1]= `b2'

. mat results[2,2]=  `b2'-(1.96*sqrt(`vce2'))

. mat results[2,3]=  `b2'+(1.96*sqrt(`vce2'))

. mat list results

results[2,3]
              beta          lo          hi
 devLR  -.38033923  -.83087198   .07019352
meanLR  -.22160323  -.38520369  -.05800276

. svmat results, names(demLR)
number of observations will be reset to 2
Press any key to continue, or Break to abort
number of observations (_N) was 0, now 2

. gen n = _n

. sort n

. save res1, replace
(note: file res1.dta not found)
file res1.dta saved

. 
. * Democratic transition, HM data *
. clear

. miest oilimp logit ged_dem d_n_hm0_oil m_n_hm0_oil $cvar  mean_dem , cluster(cowcode)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)

Multiple Imputation Estimates

Model: logit
Dependent Variable: ged_dem

Number of Observations: 4381
---------------------------------------------------------------
         |      Coef.   Std. Err.       t          Df     P>|t|
---------------------------------------------------------------
d_n_hm0_oil | -.04971    .223281     -0.223       5292    0.824
m_n_hm0_oil | -.21255   .0663764     -3.202      83001    0.001
ged_time |  -.00979      .036148     -0.271   93744875    0.786
ged_time2 |  .00036     .0010602      0.336    6762339    0.737
ged_time3 | -1.2e-06    8.40e-06     -0.146    1677609    0.884
    time |  -.21199     .1048569     -2.022     618867    0.043
   time2 |     .008     .0033972      2.355    1048789    0.019
   time3 |  -7.3e-05    .0000319     -2.285    1337248    0.022
mean_gdp |   .20872     .1326681      1.573     318052    0.116
 dev_gdp |   .56979     .4755758      1.198       1957    0.231
civilwar |   .21976     .2508217      0.876   60714527    0.381
 nbr_dem |   .47061     .1540495      3.055      14404    0.002
mean_dem |   24.317     3.647415      6.667    4264837    0.000
   _cons |  -5.8317     1.393589     -4.185      70241    0.000
---------------------------------------------------------------


. matrix results = J(2,3,.) 

. mat rownames results = devHM meanHM  

. mat colnames results = beta lo hi

. local b1 =_mib[1,1]

. local vce1 = _miVCE[1,1]

. mat results[1,1]= `b1'

. mat results[1,2]=  `b1'-(1.96*sqrt(`vce1'))

. mat results[1,3]=  `b1'+(1.96*sqrt(`vce1'))

. local b2 =_mib[2,1]

. local vce2 = _miVCE[2,2]

. mat results[2,1]= `b2'

. mat results[2,2]=  `b2'-(1.96*sqrt(`vce2'))

. mat results[2,3]=  `b2'+(1.96*sqrt(`vce2'))

. mat list results

results[2,3]
              beta          lo          hi
 devHM   -.0497076  -.48733829   .38792308
meanHM  -.21255153  -.34264933  -.08245374

. svmat results, names(demHM)
number of observations will be reset to 2
Press any key to continue, or Break to abort
number of observations (_N) was 0, now 2

. gen n = _n

. sort n

. save res2, replace
(note: file res2.dta not found)
file res2.dta saved

. 
. * Autocratic transition, LR data *
. clear

. miest oilimp logit ged_dict d_R_rog_0_GDPGSRE_Mpc_ln m_R_rog_0_GDPGSRE_Mpc_ln $cvar mean_dict, cl
> uster(cowcode)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)

Multiple Imputation Estimates

Model: logit
Dependent Variable: ged_dict

Number of Observations: 4381
---------------------------------------------------------------
         |      Coef.   Std. Err.       t          Df     P>|t|
---------------------------------------------------------------
d_R_rog_0_GDPGSRE_Mpc_ln | -.39907 .1603072   -2.489     9389    0.013
m_R_rog_0_GDPGSRE_Mpc_ln | -.01873 .0531726   -0.352    73247    0.725
ged_time |   .06672     .0334161      1.997   58380305    0.046
ged_time2 | -.00195     .0009746     -1.997  179266796    0.046
ged_time3 |  1.6e-05    7.03e-06      2.216  111448258    0.027
    time |   .04563     .0860116      0.530     190791    0.596
   time2 |  -.00104     .0030384     -0.341     416794    0.733
   time3 |   1.8e-07    .0000326      0.005     789660    0.996
mean_gdp |   -.3317     .1485327     -2.233    2529816    0.026
 dev_gdp |   .44268     .5573169      0.794       3130    0.427
civilwar |   .69834     .2388394      2.924    1281512    0.003
 nbr_dem |   .35305     .1713836      2.060       5419    0.039
mean_dict |  20.352     2.766169      7.358   11512064    0.000
   _cons |  -3.0299     1.291115     -2.347     215650    0.019
---------------------------------------------------------------


. matrix results = J(2,3,.) 

. mat rownames results = devLR meanLR  

. mat colnames results = beta lo hi

. local b1 =_mib[1,1]

. local vce1 = _miVCE[1,1]

. mat results[1,1]= `b1'

. mat results[1,2]=  `b1'-(1.96*sqrt(`vce1'))

. mat results[1,3]=  `b1'+(1.96*sqrt(`vce1'))

. local b2 =_mib[2,1]

. local vce2 = _miVCE[2,2]

. mat results[2,1]= `b2'

. mat results[2,2]=  `b2'-(1.96*sqrt(`vce2'))

. mat results[2,3]=  `b2'+(1.96*sqrt(`vce2'))

. mat list results

results[2,3]
              beta          lo          hi
 devLR  -.39906805  -.71327016  -.08486594
meanLR  -.01873102  -.12294933   .08548729

. svmat results, names(dictLR)
number of observations will be reset to 2
Press any key to continue, or Break to abort
number of observations (_N) was 0, now 2

. gen n = _n

. sort n

. save res3, replace
(note: file res3.dta not found)
file res3.dta saved

. 
. * Autocratic transition, HM data *
. clear

. miest oilimp logit ged_dict d_n_hm0_oil m_n_hm0_oil $cvar mean_dict, cluster(cowcode)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)
(StateHydrocarbonRents)

Multiple Imputation Estimates

Model: logit
Dependent Variable: ged_dict

Number of Observations: 4381
---------------------------------------------------------------
         |      Coef.   Std. Err.       t          Df     P>|t|
---------------------------------------------------------------
d_n_hm0_oil | -.37214   .1463436     -2.543      16195    0.011
m_n_hm0_oil | -.04425   .0555428     -0.797     103502    0.426
ged_time |   .06703     .0336775      1.990   18138066    0.047
ged_time2 | -.00197     .0009792     -2.011   13772724    0.044
ged_time3 |  1.6e-05    7.06e-06      2.236   10518958    0.025
    time |   .04539     .0866739      0.524     576224    0.600
   time2 |  -.00093     .0030547     -0.305    4782769    0.760
   time3 |  -1.7e-06    .0000328     -0.051   33645360    0.959
mean_gdp |  -.27798     .1544575     -1.800    7390532    0.072
 dev_gdp |   .43544     .5533921      0.787       3884    0.431
civilwar |   .69241     .2427941      2.852   35814937    0.004
 nbr_dem |   .35881      .170786      2.101      10828    0.036
mean_dict |  20.292     2.700905      7.513    9487173    0.000
   _cons |  -3.3981     1.360849     -2.497     152936    0.013
---------------------------------------------------------------


. matrix results = J(2,3,.) 

. mat rownames results = devHM meanHM  

. mat colnames results = beta lo hi

. local b1 =_mib[1,1]

. local vce1 = _miVCE[1,1]

. mat results[1,1]= `b1'

. mat results[1,2]=  `b1'-(1.96*sqrt(`vce1'))

. mat results[1,3]=  `b1'+(1.96*sqrt(`vce1'))

. local b2 =_mib[2,1]

. local vce2 = _miVCE[2,2]

. mat results[2,1]= `b2'

. mat results[2,2]=  `b2'-(1.96*sqrt(`vce2'))

. mat results[2,3]=  `b2'+(1.96*sqrt(`vce2'))

. mat list results

results[2,3]
              beta          lo          hi
 devHM  -.37214331  -.65897678  -.08530984
meanHM  -.04424644  -.15311028   .06461741

. svmat results, names(dictHM)
number of observations will be reset to 2
Press any key to continue, or Break to abort
number of observations (_N) was 0, now 2

. gen n = _n

. sort n

. save res4, replace
(note: file res4.dta not found)
file res4.dta saved

. sort n

. merge n using res3
(note: you are using old merge syntax; see [D] merge for new syntax)

. drop _merge

. sort n

. merge n using res2
(note: you are using old merge syntax; see [D] merge for new syntax)

. drop _merge

. sort n

. merge n using res1
(note: you are using old merge syntax; see [D] merge for new syntax)

. drop _merge

. save results, replace
(note: file results.dta not found)
file results.dta saved

. forval i = 1/4 {
  2.         erase res`i'.dta
  3. }

. use results, clear

. stack  dictHM1 dictLR1 demHM1 demLR1, into(beta)  clear

. sort _stack

. save beta, replace
(note: file beta.dta not found)
file beta.dta saved

. 
. use results, clear

. stack  dictHM2 dictLR2 demHM2 demLR2, into(lo)  clear

. sort _stack

. save lo, replace
(note: file lo.dta not found)
file lo.dta saved

. 
. use results, clear

. stack  dictHM3 dictLR3 demHM3 demLR3, into(hi)  clear

. sort _stack

. save hi, replace
(note: file hi.dta not found)
file hi.dta saved

. 
. merge _stack using lo
(note: you are using old merge syntax; see [D] merge for new syntax)
variable _stack does not uniquely identify observations in the master data
variable _stack does not uniquely identify observations in lo.dta

. drop _merge

. sort _stack

. merge _stack using beta
(note: you are using old merge syntax; see [D] merge for new syntax)
variable _stack does not uniquely identify observations in the master data
variable _stack does not uniquely identify observations in beta.dta

. drop _merge

. sort _stack

. save results, replace
file results.dta saved

. erase beta.dta

. erase lo.dta

. erase hi.dta

. gen dev =_n==1|_n==3|_n==5|_n==7

. gen lr = _stack==2 | _stack==4

. gen dem = _stack==3 | _stack==4

. gen n=_n

. replace n=n-4 if n>4
(4 real changes made)

.  twoway (scatter beta n if dem==1) (rspike lo hi n if dem==1, yline(0) scheme(lean2)/*
>  */ xlab(1 `" "N rents"  "deviation" "' 2 `" "N rents"  "mean" "' 3 `" "LR rents"  "deviation" "'
>  /*
>  */ 4 `" "LR rents"  "mean" "') xscale(range(.8 4.2))  ylab(-.8(.2).4,glcolor(gs15)) /*
>  */ xtitle("") legend(lab(1 "estimate")  lab(2 "95 CI") pos(6) ring(1) col(2)) title(Democratic t
> ransition))

.         graph export "C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRich
> ter\Fig4.pdf", as(pdf) replace
(file C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRichter\Fig4.pdf writt
> en in PDF format)

. 
.   twoway (scatter beta n if dem==0) (rspike lo hi n if dem==0, yline(0) scheme(lean2)/*
>  */ xlab(1 `" "N rents"  "deviation" "' 2 `" "N rents"  "mean" "' 3 `" "LR rents"  "deviation" "'
>  /*
>  */ 4 `" "LR rents"  "mean" "') xscale(range(.8 4.2))  ylab(-.8(.2).2,glcolor(gs15)) /*
>  */ xtitle("") legend(lab(1 "estimate")  lab(2 "95 CI") pos(6) ring(1) col(2)) title(Autocratic t
> ransition))

.         graph export "C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRich
> ter\Fig5.pdf", as(pdf) replace
(file C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRichter\Fig5.pdf writt
> en in PDF format)

. 
. log close
      name:  <unnamed>
       log:  C:\Users\jwright\Dropbox\Research\Oil and Authoritarian Stability\LucasRichter\Data\Re
> plication data\FW-response.log
  log type:  text
 closed on:  25 Apr 2017, 20:12:47
---------------------------------------------------------------------------------------------------
